import request from '@/utils/request'

// 查询捐赠物品列表
export function listDonation(query) {
  return request({
    url: '/manage/donation/list',
    method: 'get',
    params: query
  })
}

// 查询捐赠物品详细
export function getDonation(id) {
  return request({
    url: '/manage/donation/' + id,
    method: 'get'
  })
}

// 新增捐赠物品
export function addDonation(data) {
  return request({
    url: '/manage/donation',
    method: 'post',
    data: data
  })
}

// 修改捐赠物品
export function updateDonation(data) {
  return request({
    url: '/manage/donation',
    method: 'put',
    data: data
  })
}

// 删除捐赠物品
export function delDonation(id) {
  return request({
    url: '/manage/donation/' + id,
    method: 'delete'
  })
}
